import { loadMenuFromConfig, validateConfig, getUseConfigFileFlag } from '../commonService';

// 是否使用配置文件（从配置文件中获取，默认为 true）
const USE_CONFIG_FILE = getUseConfigFileFlag();

// 根据USE_CONFIG_FILE决定使用配置文件还是原始mock数据
const configMenuData = USE_CONFIG_FILE ? loadMenuFromConfig() : null;

// 渠道加盟平台功能菜单mock数据
export const mockMenuData = USE_CONFIG_FILE && configMenuData ? configMenuData : {
    code: 200,
    message: '获取成功',
    data: {
        "ApplicationID": "64b4e441-82d7-4314-b25d-6efaefc61dcb",
        "ApplicationName": "加盟商服务平台",
        "AppFullName": "加盟商服务平台",
        "ApplicationIcon": "",
        "IsDisabled": 0,
        "Comments": "",
        "ApplicationURL": "http://ChannelFranchise.teld.cn",
        "DeleteMark": 0,
        "AppID": "ChannelFranchise",
        "SortCode": 0,
        "NodeType": 0,
        "Type": "1",
        "ChildGroup": [
            {
                "Name": "概览",
                "NameInitials": "概览",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "首页",
                        "NameInitials": "首页",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_WorkBench_Index",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "4607c65f-bd57-4d3a-8f1c-2f35af7418a7"
                    }
                ],
                "ID": "bb08ef56-9f70-4dea-a01c-8e37baa6a1be"
            },
            {
                "Name": "经营",
                "NameInitials": "经营",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "经营罗盘",
                        "NameInitials": "经营罗盘",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_OperationCompass",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "ec924383-81f9-4fb9-a839-9fa1779ba392"
                    },
                    {
                        "Name": "营收分析",
                        "NameInitials": "营收分析",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_RevenueAnalysis",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "e02b4d90-3cf4-4e99-b7a3-87b244c91191"
                    },
                    {
                        "Name": "风控中心",
                        "NameInitials": "风控中心",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_RiskControl",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "fb277fca-8564-48ba-bfb4-4af80def1926"
                    }
                ],
                "ID": "977b1ca3-41a6-47bb-92ea-3cd0f7aafd0d"
            },
            {
                "Name": "DEMO",
                "NameInitials": "DEMO",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "站点管理",
                        "NameInitials": "站点管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerStaAdministration",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "c0b38306-9406-4ae9-bbee-c3764acce267"
                    },
                    {
                        "Name": "价格管理",
                        "NameInitials": "价格管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerPriceManagement",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "7463ecf7-301a-40a2-b43c-c3e5c10f566a"
                    },
                    {
                        "Name": "监控调度",
                        "NameInitials": "监控调度",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerMonitoringSchedule",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "c084d24e-904b-499f-9d59-c13d174b9164"
                    },
                    {
                        "Name": "电站列表",
                        "NameInitials": "电站列表",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerPowerStaList",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "76169e4b-f3e6-4afd-92af-ab607576c285"
                    },
                    {
                        "Name": "占用管理",
                        "NameInitials": "占用管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerOccupancyManagement",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "403154d4-526f-449b-ad8e-6301a89e261e"
                    },
                    {
                        "Name": "场站大屏",
                        "NameInitials": "场站大屏",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerStationDisplay",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "3e5fee9a-5731-487d-beae-1e4ec0cb6ccf"
                    }
                ],
                "ID": "5617b291-2c47-4396-9101-e4eff2836812"
            },
            {
                "Name": "订单",
                "NameInitials": "订单",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "充电订单",
                        "NameInitials": "充电订单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_ChargeOrder",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "cf33b7db-fb1d-4209-9134-b3b89676f690"
                    },
                    {
                        "Name": "占用订单",
                        "NameInitials": "占用订单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_OccupyOrder",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "270ff94f-bb75-4245-bfab-2512d871c92f"
                    },
                    {
                        "Name": "调整订单",
                        "NameInitials": "调整订单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_AdjustOrder",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "ff2b7298-3a79-4306-8420-d592085dd1b7"
                    },
                    {
                        "Name": "订单统计",
                        "NameInitials": "订单统计",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_OrderStatistics",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "bf152d77-1f2c-4e33-96e9-8618472f7cc8"
                    }
                ],
                "ID": "bd1af80e-b07c-4b9d-aab9-27890d3a2481"
            },
            {
                "Name": "财务",
                "NameInitials": "财务",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "充值退款",
                        "NameInitials": "充值退款",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_Finance_RechargeRefund",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "987fdccb-e5ac-41fe-ad52-376c8f94647b"
                    },
                    {
                        "Name": "发票申请",
                        "NameInitials": "发票申请",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_InvoiceApplication",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "4b01e874-916e-4d0d-8256-3a6dda9a03a5"
                    },
                    {
                        "Name": "发票开具",
                        "NameInitials": "发票开具",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_Finance_Invoicing",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "c07e1f03-3f3e-4fd9-82ce-d6b0294a87f7"
                    },
                    {
                        "Name": "对账查询",
                        "NameInitials": "对账查询",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_BillQuery",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "93ce135f-b7d8-4c52-a303-379894bc5d11"
                    },
                    {
                        "Name": "账单",
                        "NameInitials": "账单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartner_Bill",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "c6cc63e0-044a-4bae-ad31-02180615d5fc"
                    },
                    {
                        "Name": "账户中心",
                        "NameInitials": "账户中心",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_Finance_AccountCenter",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "18f15015-3714-4deb-9b33-b95ef8d077f4"
                    }
                ],
                "ID": "9eeb668d-f8aa-4390-85ec-8f13287f7832"
            },
            {
                "Name": "营销",
                "NameInitials": "营销",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "活动管理",
                        "NameInitials": "活动管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerEventManagement",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "994d0e6c-0fb3-4b2b-8de8-a0ea3c929c81"
                    },
                    {
                        "Name": "营销工具",
                        "NameInitials": "营销工具",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerMarketTool",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "5cffc654-a3db-4c4e-ba49-8f6c790394b2"
                    },
                    {
                        "Name": "卡券管理",
                        "NameInitials": "卡券管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerCardCouponManagement",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "c1ea383a-3d4c-4b4d-a2de-3f73ad82a455"
                    },
                    {
                        "Name": "活动分析",
                        "NameInitials": "活动分析",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_Menu_SaaSPartnerActiveAnalysis",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "2102371b-455a-40ef-a29d-eb910d35f637"
                    },
                    {
                        "Name": "客户分组",
                        "NameInitials": "客户分组",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_SaaSPartnerCustGroup",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "53bdaa1e-e70b-44b0-8b33-a1fbc3f4cbd4"
                    }
                ],
                "ID": "4a657a15-d404-4779-b4e9-33d4288da26b"
            },
            {
                "Name": "企业",
                "NameInitials": "企业",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "企业大客户",
                        "NameInitials": "企业大客户",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerEnterprise_BigConsumer",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "fc837944-9e26-43ee-bde5-8450d6bf7612"
                    },
                    {
                        "Name": "企业账单",
                        "NameInitials": "企业账单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerEnterprise_Bills",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "b46c4740-b908-47c7-ab31-51d8cbdb83c8"
                    },
                    {
                        "Name": "大客户分析",
                        "NameInitials": "大客户分析",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerEnterprise_BigCustomerAnalysis",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "d9b01224-7186-4a1d-a7da-1d8071acd089"
                    }
                ],
                "ID": "0418f576-bfbf-4644-9bb4-020a2a245f1f"
            },
            {
                "Name": "运维",
                "NameInitials": "运维",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "设备告警",
                        "NameInitials": "设备告警",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerOps_Alarm",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "8559e895-0622-4e1b-b4d4-ed2f774bd8fa"
                    }
                ],
                "ID": "fa02cf33-d6e8-45e9-8b13-941653133185"
            },
            {
                "Name": "工单",
                "NameInitials": "工单",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "平台工单",
                        "NameInitials": "平台工单",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_platformworkorder",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "14bf1771-079e-4df0-ba9a-ddfc39164d4d"
                    }
                ],
                "ID": "c660a508-1683-43db-a6ad-e839ab6ac618"
            },
            {
                "Name": "客服",
                "NameInitials": "客服",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "电站评论",
                        "NameInitials": "电站评论",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_StaReview",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "59cad353-faea-4994-a9cf-bc8528a771bf"
                    }
                ],
                "ID": "5fc797b6-f6fb-4c0c-926a-e06febb6be0c"
            },
            {
                "Name": "安全",
                "NameInitials": "安全",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "充电安全预警",
                        "NameInitials": "充电安全预警",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_Safe_ChargingSafetyWarning",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "20742045-3270-4244-85d1-bd5ec5d56322"
                    }
                ],
                "ID": "820d3b78-ced4-405c-987a-fb903dccc41d"
            },
            {
                "Name": "系统",
                "NameInitials": "系统",
                "Code": "301-005-000-001",
                "ParentFuncGroupID": null,
                "Layer": 2,
                "Img": "",
                "NavigateUrl": "",
                "Path": null,
                "ChildGroup": [],
                "Functions": [
                    {
                        "Name": "员工管理",
                        "NameInitials": "员工管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerSysManage_EmployeeManagement",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "5a7fa414-9eb1-4909-b8b1-bba88e671d6b"
                    },
                    {
                        "Name": "部门管理",
                        "NameInitials": "部门管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerSysManage_Department",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "83927b66-6d15-4af9-84be-d109d6a0df0b"
                    },
                    {
                        "Name": "角色管理",
                        "NameInitials": "角色管理",
                        "Code": "301-005-000-001",
                        "FunctionType": 0,
                        "NavigateUrl": "/Menu_PartnerSysManage_Role",
                        "Description": "",
                        "Icon": null,
                        "IconColor": null,
                        "RouterInfo": null,
                        "ApplicationSystemID": null,
                        "FunctionGroupID": null,
                        "Type": "4",
                        "ApplicationURL": null,
                        "AppID": null,
                        "MID": null,
                        "MaxWin": 0,
                        "EndpointDisplayConfig": 0,
                        "ID": "a4ddc919-5f4a-498a-8d04-502661f278c8"
                    }
                ],
                "ID": "cfbe9ea1-f695-4922-8210-114d297a4511"
            }
        ],
        "Functions": [],
        "IsWorkCenterEnabled": true,
        "WorkCenterNavigationMode": 1,
        "ID": null
    }
}

/**
 * 获取菜单数据（根据配置选择使用配置文件或原始mock数据）
 * @returns {Object} 菜单数据
 */
export function getMenuData () {
    if (USE_CONFIG_FILE) {
        try {
            // 验证配置文件格式
            const validation = validateConfig();
            if (!validation.isValid) {
                console.error('配置文件格式错误:', validation.errors);
                console.warn('将使用原始mock数据');
                return mockMenuData;
            }

            if (validation.warnings.length > 0) {
                console.warn('配置文件警告:', validation.warnings);
            }

            // 使用配置文件数据
            return loadMenuFromConfig();
        } catch (error) {
            console.error('加载配置文件失败:', error);
            console.warn('将使用原始mock数据');
            return mockMenuData;
        }
    } else {
        // 使用原始mock数据
        return mockMenuData;
    }
}

/**
 * 切换数据源（用于开发和测试）
 * @param {boolean} useConfig 是否使用配置文件
 */
export function switchDataSource (useConfig) {
    // 注意：这个函数只在开发环境中使用
    // 生产环境中应该通过修改 USE_CONFIG_FILE 常量来控制
    if (typeof useConfig === 'boolean') {
        // 这里可以添加动态切换逻辑，但需要注意模块缓存问题
        console.log(`数据源切换为: ${useConfig ? '配置文件' : '原始mock数据'}`);
    }
}

// 默认导出获取菜单数据的函数
export default getMenuData;


export const mockNavbarConfigs = [
    {
        "Id": "894377c5-51da-4b88-aaa3-d38653febca5",
        "Icon": "icon-t-saas-home",
        "ActivedIcon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_1908_17164)\"><path d=\"M18.0942 24H5.95297C4.39871 24 3.62157 24 3.00837 23.7072C2.46837 23.4493 2.01782 23.0359 1.71465 22.5199C1.37038 21.9341 1.30381 21.1598 1.17068 19.6112L0.26912 9.12482C0.171916 7.99419 0.123314 7.42888 0.25933 6.92061C0.379552 6.47136 0.602577 6.05621 0.910791 5.70794C1.25949 5.31393 1.75768 5.04236 2.75405 4.49922L8.58186 1.32238C9.84461 0.634035 10.476 0.28986 11.1433 0.15541C11.734 0.036401 12.3425 0.0372275 12.9329 0.157841C13.5998 0.294102 14.2302 0.639991 15.4911 1.33177L21.269 4.5018C22.2577 5.04422 22.752 5.31543 23.0985 5.70763C23.4048 6.0543 23.6267 6.46711 23.747 6.91378C23.8831 7.4191 23.8367 7.98103 23.7439 9.10489L22.8779 19.595C22.7496 21.1488 22.6855 21.9257 22.3418 22.5138C22.0392 23.0316 21.5882 23.4469 21.0472 23.7059C20.4329 24 19.6533 24 18.0942 24Z\" fill=\"currentColor\"/><path d=\"M7.90771 14.3852C7.90771 12.0975 9.76219 10.2431 12.0498 10.2431V10.2431C14.3374 10.2431 16.1919 12.0975 16.1919 14.3852V20.1631C16.1919 20.7232 16.1919 21.0032 16.0829 21.2171C15.987 21.4053 15.834 21.5583 15.6459 21.6541C15.432 21.7631 15.1519 21.7631 14.5919 21.7631H9.50771C8.94766 21.7631 8.66764 21.7631 8.45372 21.6541C8.26556 21.5583 8.11258 21.4053 8.01671 21.2171C7.90771 21.0032 7.90771 20.7232 7.90771 20.1631V14.3852Z\" fill=\"url(#paint0_linear_1908_17164)\"/></g><defs><linearGradient id=\"paint0_linear_1908_17164\" x1=\"12.0498\" y1=\"10.2431\" x2=\"12.0498\" y2=\"21.7631\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"white\"/><stop offset=\"1\" stop-color=\"white\" stop-opacity=\"0.5\"/></linearGradient><clipPath id=\"clip0_1908_17164\"><rect width=\"24\" height=\"24\" fill=\"white\"/></clipPath></defs></svg>",
        "IsEnable": true,
        "Component": "mweb_render",
        "NavigateUrl": "/web/SAAS_EXT_Home",
        "DisplayName": "首页",
        "Position": "bottom",
        "Description": "企业大客户系统"
    },
    {
        "Id": "8410d034-1292-4eea-825a-e0b5c0d05d26",
        "Icon": "icon-t-saas-station",
        "ActivedIcon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_1908_17185)\"><path d=\"M18.1592 0C20.3682 0.000138492 22.1592 1.79095 22.1592 4V18.2541C22.1592 18.7621 22.5633 19.1682 22.9931 19.439C23.5547 19.7927 23.9277 20.4179 23.9277 21.1309V22C23.9277 23.1046 23.0323 24 21.9277 24H2.07324C0.968683 24 0.0732589 23.1046 0.0732422 22V21.1309C0.0732422 20.4179 0.446352 19.7927 1.00794 19.439C1.43776 19.1683 1.8418 18.7621 1.8418 18.2542V4C1.8418 1.79087 3.63267 1.94234e-05 5.8418 0H18.1592Z\" fill=\"currentColor\"/><path d=\"M10.1217 13.1322C10.1239 13.1244 10.1181 13.1166 10.11 13.1166H7.35736C6.99585 13.1166 6.74646 12.7806 6.87509 12.467L9.62639 5.76039C9.7026 5.57463 9.89436 5.45178 10.1084 5.45178H14.7509C15.1173 5.45178 15.3669 5.79643 15.2287 6.11153L13.6343 9.74613C13.6307 9.75419 13.6366 9.76324 13.6454 9.76324H16.6425C17.086 9.76324 17.3226 10.2488 17.0301 10.5583L9.6363 18.3826C9.27693 18.7631 8.61053 18.4335 8.74995 17.9443L10.1217 13.1322Z\" fill=\"url(#paint0_linear_1908_17185)\"/></g><defs><linearGradient id=\"paint0_linear_1908_17185\" x1=\"12\" y1=\"8.02612\" x2=\"12\" y2=\"18.5482\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"white\"/><stop offset=\"1\" stop-color=\"white\" stop-opacity=\"0.5\"/></linearGradient><clipPath id=\"clip0_1908_17185\"><rect width=\"24\" height=\"24\" fill=\"white\"/></clipPath></defs></svg>",
        "IsEnable": true,
        "Component": "mweb_render",
        "NavigateUrl": "/web/SAAS_EXT_ChargeLive",
        "DisplayName": "充电实况",
        "Position": "bottom",
        "Description": "企业大客户系统",
    },
    {
        "Id": "d6a4daa0-a738-44dd-828b-b85084078822",
        "Icon": "icon-t-saas-more",
        "ActivedIcon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_1908_17174)\"><rect x=\"0.374023\" y=\"0.373932\" width=\"10.6427\" height=\"10.6427\" rx=\"1.96915\" fill=\"currentColor\"/><rect x=\"0.374023\" y=\"13.0655\" width=\"10.6427\" height=\"10.6427\" rx=\"1.96915\" fill=\"currentColor\"/><rect x=\"13.0654\" y=\"0.373932\" width=\"10.6427\" height=\"10.6427\" rx=\"1.96915\" fill=\"currentColor\"/><rect x=\"13.0654\" y=\"13.0655\" width=\"10.6427\" height=\"10.6427\" rx=\"1.96915\" fill=\"currentColor\"/></g><defs><clipPath id=\"clip0_1908_17174\"><rect width=\"24\" height=\"24\" fill=\"white\"/></clipPath></defs></svg>",
        "IsEnable": true,
        "Component": "mweb_funcCenter",
        "DisplayName": "功能中心",
        "Position": "bottom",
        "Description": "企业大客户系统"
    },
    {
        "Id": "111a99d3-0fb1-4ac9-b38b-0212bd7afe97",
        "Icon": "icon-t-ecms1-orderForm",
        "ActivedIcon": "<svg width=\"25\" height=\"24\" viewBox=\"0 0 25 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.84668 3.70996C7.84669 4.12417 8.18247 4.45996 8.59668 4.45996H16.4033C16.8175 4.45994 17.1533 4.12415 17.1533 3.70996V1.28711H20.3066C21.3367 1.28716 22.1718 2.12229 22.1719 3.15234V21.5537C22.1718 22.5838 21.3367 23.4189 20.3066 23.4189H4.69336C3.66329 23.4189 2.82818 22.5838 2.82812 21.5537V3.15234C2.82818 2.12228 3.66329 1.28714 4.69336 1.28711H7.84668V3.70996ZM14.7031 8.19824C14.4103 7.90548 13.9354 7.90554 13.6426 8.19824L9.18164 12.6602C8.96728 12.8747 8.90251 13.1974 9.01855 13.4775C9.13469 13.7577 9.40864 13.9404 9.71191 13.9404H13.4785L10.2969 17.1211C10.0041 17.4139 10.0041 17.8888 10.2969 18.1816C10.5897 18.4746 11.0645 18.4745 11.3574 18.1816L15.8203 13.7207C16.0348 13.5063 16.0993 13.1835 15.9834 12.9033C15.8673 12.6231 15.5934 12.4404 15.29 12.4404H11.5225L14.7031 9.25879C14.9958 8.96592 14.9958 8.49109 14.7031 8.19824ZM15.5908 2.9873H9.40918V0.581055H15.5908V2.9873Z\" fill=\"currentColor\"/></svg>",
        "IsEnable": true,
        "Component": "mweb_render",
        "NavigateUrl": "/web/SAAS_EXT_OrderManagement",
        "DisplayName": "订单管理",
        "Position": "bottom",
        "Description": "企业大客户系统",
    },
    {
        "Id": "1773392b-c01a-4408-abce-7a5c9cdf6e53",
        "Icon": "icon-t-saas-my",
        "ActivedIcon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20.6499 0.115082C21.7545 0.115082 22.6499 1.01051 22.6499 2.11508V12.7674C22.6498 14.8243 21.614 16.6374 20.0361 17.7179C19.6775 17.9635 19.4602 18.3833 19.5331 18.8118L19.9995 21.5497C20.2071 22.7705 19.2662 23.8844 18.0278 23.8846H5.97314C4.7346 23.8846 3.79382 22.7707 4.00146 21.5497L4.46631 18.8124C4.53905 18.3841 4.32173 17.9645 3.96325 17.7191C2.38518 16.6385 1.34924 14.8245 1.34912 12.7674V6.11508C1.34912 2.80137 4.03541 0.115082 7.34912 0.115082H20.6499Z\" fill=\"currentColor\"/><path d=\"M7.47412 9.81137C7.47412 9.81137 7.92406 14.1886 12.1831 14.1886C16.4422 14.1886 16.8921 9.81137 16.8921 9.81137\" stroke=\"url(#paint0_linear_1908_17180)\" stroke-width=\"2.5\" stroke-linecap=\"round\"/><defs><linearGradient id=\"paint0_linear_1908_17180\" x1=\"12.1831\" y1=\"10.6718\" x2=\"12.1831\" y2=\"14.1886\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"white\" stop-opacity=\"0.5\"/><stop offset=\"1\" stop-color=\"white\"/></linearGradient></defs></svg>",
        "IsEnable": true,
        "Component": "mweb_render",
        "NavigateUrl": "/web/SAAS_EXT_MyAccount",
        "DisplayName": "我的账户",
        "Position": "bottom",
        "Description": "企业大客户系统",
    },
    {
        "Id": "b3b52623-bbf2-436f-8af8-f3063440a3a3",
        "Icon": "icon-t-More",
        "ActivedIcon": "icon-t-More-fill",
        "IsEnable": true,
        "Component": "mweb_search",
        "DisplayName": "搜索",
        "Position": "top",
        "Description": "企业大客户系统",
    },
    {
        "Id": "243c01c1-49dd-4528-b86c-01d1e360dfa7",
        "Icon": "icon-t-orderForm",
        "ActivedIcon": "icon-t-orderForm-fill",
        "IsEnable": true,
        "Component": "mweb_my",
        "DisplayName": "我的",
        "Position": "top",
        "Description": "企业大客户系统",
    }
];
